<?php

// Includes obligatorios
include ('./dbconfig.php');
include ('../Libraries/Tools/JLTools.class.php');

// Objeto JLTools
$jl = new JLTools();

$SQL = "SELECT 
      `int_id_newsletter`,
      `var_nom_newsletter`,
      `var_htmldesc`,
      `int_sent`
    FROM
      tbl_states
    INNER JOIN `tbl_newsletter` ON (tbl_states.int_id_state = `tbl_newsletter`.int_id_state)";
$campoId = "int_id_newsletter";

$jl->dataGridJSON($cnn, $SQL, $campoId);

// Cerrar la coneccion obligatorio
mysql_close($cnn);